<!DOCTYPE html>
<html>
<head> 
<#assign base=request.getContextPath()/>
<title>教学班信息</title>

<!--  
<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script>
-->
<link type="text/css" href="${base}/css/style.css" rel="stylesheet"/>
<script type="text/javascript" src="${base}/js/func.js"></script>
<script type="text/javascript" src="${base}/js/md5.js"></script> 
<script type="text/javascript" src="${base}/js/jquery-3.2.1.js"></script> 
<link rel="stylesheet" href="//apps.bdimg.com/libs/jqueryui/1.10.4/css/jquery-ui.min.css">
<script src="//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js "></script>
<script src="//apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js "></script>
<link rel="stylesheet" href="jqueryui/style.css">

</head>
<body>
<style>

</style>
<script>




>

<script type="text/javascript">
   <!-- 去除第一级下拉框重复选项 -->
   window.onload = function() {
   var eles=document.getElementsByClassName("del");
   for(var i=0;i<eles.length;i++){
   var opts = eles[i].options;

   var obj = new Object(), index = 0;

   while (index < opts.length) {

   if (opts[index].text in obj) opts[index] = null;

    else {

    obj[opts[index].text] = opts[index].text;

    index++;

   }

 }
     obj = null;
     }
   }
  
</script>
<script>
		  	courseNames = new Object();
		  	
		  	<#list courselist as cl>
		  		courseNames['${cl.semester}']=new Array();
		  	</#list>
		  	<#list courselist as cl>
		  	    var count = courseNames['${cl.semester}'].push('${cl.courseName}');
		  	</#list>
		  	
			function set_courseName(semester, courseName)
			{
			    var cov,clv;
			    var i, ii;
			    clv=semester.value;
			    if(clv=='0') return;
			    if(typeof(courseNames[clv])=='undefined') return;
			    <!--去除第二级下拉框选项  -->
			     $("#search").find("option:selected").text(""); 
			     $("#search").empty();
			    for(i=0; i<courseNames[clv].length; i++)
			    {
			        
			       ii=i;
			       courseName.options[ii] = new Option();
			       courseName.options[ii].text = courseNames[clv][i];
			       courseName.options[ii].value = courseNames[clv][i];
			    }
			  }
			   
</script>
<script>
           teachersNumbers= new Object();
           <#list teacherslist as te>
		  	    teachersNumbers['${te.teacherName}']=new Array();
		  	</#list>
		  	<#list teacherslist as te>
		  	    var count = teachersNumbers['${te.teacherName}'].push('${te.teacherNumber}');
		  	</#list>
		  	 function set_teacherNumber(teacherName, teacherNumber)
			{
			    var cov,clv;
			    var i, ii;
			    clv=teacherName.value;
			    if(clv=='0') return;
			    if(typeof(teachersNumbers[clv])=='undefined') return;
			     $("#search3").find("option:selected").text(""); 
			     $("#search3").empty();
			    for(i=0; i<teachersNumbers[clv].length; i++)
			    {
			        
			        ii=i;
			       teacherNumber.options[ii] = new Option();
			       teacherNumber.options[ii].text = teachersNumbers[clv][i];
			       teacherNumber.options[ii].value = teachersNumbers[clv][i];
			       
			    }
			}
</script>

<h1 style="text-align:center;font-family:arial;color:block;letter-spacing:2px;"><font size="50">小学生答题测试系统</font></h1>
	<p style="text-align:center;word-spacing:5px">
	<font size="6">
    <a href="/introduce.html">首页</a>&nbsp;
    <a href="/classes.html">教学班</a>&nbsp;&nbsp;
    <a href="/student.html">学生</a>&nbsp;&nbsp;
    <a href="/teacher.html">老师</a>&nbsp;&nbsp;
    <a href="/course.html">课程</a>&nbsp;&nbsp;
    <a href="/question.html">题库</a>&nbsp;&nbsp;
    <a href="/exam.html">测验</a>&nbsp;&nbsp;
    <a href="/loginUser.html">登录</a>&nbsp;&nbsp;
    <a href="/logout.html">退出</a>&nbsp;&nbsp;
    </font>
    </p>
 
<div style="border-style:solid; border-color:#98bf21;width:400; height:150">
 <form id="form1" method ="post"  action="">
         学期：<select class="del" id="select_id" name="semester" style="width:100px" onChange="set_courseName(this,this.form.courseName)"> 
         <#list courselist as cl>
         <option value="0">--请选择--</option>
		    <option value="${cl.semester}">${cl.semester}</option>
		 </#list>
       </select><br></br>
       课程名称：<select id="search" name="courseName" style="width:100px">
			<option value="0">--请选择--</option>
		</select><br></br> 
	老师姓名：<select class="del" id="id2" name="teacherName" style="width:100px" onChange="set_teacherNumber(this,this.form.teacherNumber)">
         <#list teacherslist as te>
           <option value="0">--请选择--</option> 
		    <option value="${te.teacherName}">${te.teacherName}</option>
		 </#list>
          </select><br></br>
       老师工号：<select id="search3" name="teacherNumber" style="width:100px">
		<option value="0">--请选择--</option>	
		</select><br></br>  
		<input type="hidden" name="classId",id="classId"></input>
		<input class="dialog_btn" id="change" type="button"  value="修改" onclick="is_submit(1)"></input>
        <input  class="dialog_btn" id="add" type="button"  value="新建" onclick="is_submit(2)" ></input>
	</form>


</div>

 

</body>
</html>
